<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
 var sg = prompt("请输入您要查询的水果")
 switch (sg) {
     case "苹果":
         alert("苹果2元/斤。")
         break;
     case "榴莲":
         alert("榴莲10元/斤。")
         break;  
         case "香蕉":
         alert("香蕉5元/斤。")
         break;  
     default:
         alert("没有找到您查询的水果。")
         break;
 }
 </script>
</head>
<body>
                        
</body>
</html>